namespace CLELCore.Assembly.CLELInstructions
{
	public class Ldci4s : CLELInstruction
	{
		private byte _constant;
		public byte Constant
		{
			get
			{
				return _constant;
			}
			set
			{
				_constant = value;
			}
		}
		public override int Length
		{
			get
			{
				return 2;
			}
		}
		public Ldci4s(byte constant) : base(CLELOpcode.LDCI4S)
		{
			_constant = constant;
		}

		public override byte[] GetBytes(bool little_endian)
		{
			byte[] ret = new byte[2];
			ret[0] = CLELOpcode.LDCI4S;
			ret[1] = _constant;
			return ret;
		}
		
		public override string ToString()
		{
			return "ldc.i4.s " + _constant;
		}
	}
}
